package com.lxf.project.inteface.entity;


import java.io.Serializable;
import javax.validation.constraints.Future;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Past;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
/**
 * 传实体类方式。
 *
 */
public class Student implements Serializable {
    @NotNull // 不允许为空
    @Size(min = 1, max = 50)// 长度或大小范围）
    private String name;
    @NotNull // 不允许为空
    @Size(min = 1, max = 150)// 长度或大小范围）
    private Integer age;
    @NotNull // 不允许为空
    @Size(min = 1, max = 2)// 长度或大小范围）
    private Integer sex;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", sex=" + sex +
                '}';
    }
}
